<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            text-decoration: none;
        }

        .pad-left {
            padding: 5px 10px;
        }

        .size14 {
            font-size: 15px;
        }
        .yao{
            display: flex;
            justify-content: space-around;
            margin: 2px 0px;
        }
        .title-list{
            width: 100%;
            display: flex;
        }
        .h3{
            text-align: center;
            padding: 30px 0px;
        }
        .border{
            border: 1px solid rgb(49, 47, 47);
            margin: 8px;
        }
        .wid20{
            width: 20%;
        }
        .wid40{
            width: 40%;
        }
        .table{
            border-spacing: 4px; /* 设置行和行之间的间距，可以根据需要调整数值 */
            border-collapse: separate; 
            width: 100%;
            text-align: center;
        }
    </style>
</head>

<body>
    <div class="border">
        <div class="pad-left">处方编号:{$info.num}</div>
        <h3 class="h3">澄一藏中医诊所处方笺</h3>
        <div style="display: flex;width: 100%;" class="pad-left">
            <div class="wid20"><span>姓名:</span>&nbsp;<span class="size14">{$info.realname}</span></div>
            <div class="wid20"><span>性别:</span>&nbsp;<span class="size14">{$info.sex}</span></div>
            <div class="wid20"><span>年龄:</span>&nbsp;<span class="size14">{$info.age}</span></div>
        </div>
        <hr>
        <div  class="pad-left title-list">
            <div class="wid40"><span>住址:</span>&nbsp;<span class="size14">{$info.address}</span></div>
            <div class="wid40"><span>日期:</span>&nbsp;<span class="size14">{$info.addtime}</span></div>
        </div>
        <hr>
        <div class="pad-left"><span>诊断：</span><span></span></div>
        <hr>
        <div id="content" style="min-height: 300px;">
            {if !empty($info['medicine'])}
            <table class="table">
                <tr>
                    <td class="wid20">名称</td>
                    <td class="wid20">数量</td>
                    <td class="wid20">单位</td>
                    <td class="wid20">单价</td>
                    <td class="wid20">小计</td>
                </tr>

                {foreach $info['medicine'] as $k=>$v}
                <tr>
                    <td class="wid20">{$v.name}</td>
                    <td class="wid20">{$v.quantity}</td>
                    <td class="wid20">{$v.unit}</td>
                    <td class="wid20">{$v.price}</td>
                    <td class="wid20">{$v.subtotal}</td>
                </tr>
                {/foreach}
            </table>
            {/if}
        </div>
        <div class="pad-left"><span>医嘱信息：</span><span class="size14">{$info.doctor_advice}</span></div>
        <hr>
        <div class="pad-left">
            <div><span>医师签名：</span><span class="size14">{$info.doctor_name}</span></div>
        </div>
        <hr>
        <div class="pad-left"><span>总金额：</span><span class="size14">{$info.total_price}</span></div>
    </div>
</body>

</html>